﻿using System;
using System.Collections.Generic;

namespace BlogEngine.Core
{
	/// <summary>
	/// An interface implemented by the classed that can be published.
	/// <remarks>
	/// To implemnet this interface means that the class can be searched
	/// from the search page and that it can be syndicated in RSS and ATOM.
	/// </remarks>
	/// </summary>
	public interface IPublishable
	{
		/// <summary>
		/// Gets the id.
		/// </summary>
		/// <value>The id.</value>
		int Id { get; }

		/// <summary>
		/// Gets the author.
		/// </summary>
		/// <value>The author.</value>
		string Author { get; }

		/// <summary>
		/// Gets the perma link.
		/// </summary>
		/// <value>The perma link.</value>
		Uri PermaLink { get; }

		/// <summary>
		/// Gets the date created.
		/// </summary>
		/// <value>The date created.</value>
		DateTime DateCreated { get; }

		/// <summary>
		/// Gets the date published.
		/// </summary>
		/// <value>The date published.</value>
		DateTime? DatePublished { get; }

		/// <summary>
		/// Gets the date modified.
		/// </summary>
		/// <value>The date modified.</value>
		DateTime DateModified { get; }

		/// <summary>
		/// Gets the title of the object
		/// </summary>
		string Title { get; }

		/// <summary>
		/// Gets the description.
		/// </summary>
		/// <value>The description.</value>
		string Excerpt { get; }

		/// <summary>
		/// Gets the content.
		/// </summary>
		/// <value>The content.</value>
		string Content { get; }

		/// <summary>
		/// Gets the categories.
		/// </summary>
		/// <value>The categories.</value>
		IList<Term> Categories { get; }

		/// <summary>
		/// Gets the tags.
		/// </summary>
		/// <value>The tags.</value>
		IList<Term> Tags { get; }

		/// <summary>
		/// Gets a value indicating whether this instance is visible.
		/// </summary>
		/// <value>
		/// 	<c>true</c> if this instance is visible; otherwise, <c>false</c>.
		/// </value>
		bool IsVisible { get; }

		/// <summary>
		/// Raises the <see cref="E:Serving"/> event.
		/// </summary>
		/// <param name="eventArgs">The <see cref="BlogEngine.Core.ServingEventArgs"/> instance containing the event data.</param>
		void OnServing(ServingEventArgs eventArgs);
	}
}